<?php
/**
 * Created by PhpStorm.
 * User: Victor
 * Date: 2018/8/13
 * Time: 18:07
 */

namespace app\index\model;
use think\Model;


class Heyue extends Model
{
    // 表名
    protected $table = 'heyue';
    protected $append = [
        'heyue_cs',
    ];
    protected function getHeyueCsAttr($value, $data)
    {
        $value = $value ? $value : $data['heyue_zu_id'];
        $res = HeyueZu::get($value);
        return $res['heyue_cs'];
    }
}